home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Environments / LogoMation 1.1.2 / Examples / multi pen / multi pen
Encoding:
Text File  |  1996-02-18  |  1.4 KB  |  78 lines  |  [UVtx/UVtl]

  1. // This program demonstrates the use of named pens.  Named
  2. // pen (or, if you must, named turtles) allow you to define
  3. // and use different pens, each with its own properties such
  4. // as current location, animation, width etc.
  5.  
  6. Library ":Lib:multi pen.lib"
  7.  
  8. /////////////////////////////////////////////////////////////
  9. initHeader()
  10. Header("the Talking Multi Pen")
  11.  
  12. Picture "triangle"
  13.     Fill 2,9176,65535,4563
  14.         Repeat 3
  15.             Left 120
  16.             Forward 40
  17.  
  18. Header("pen #1 draws in black")
  19. Pen name="pen #1"
  20. Repeat 7
  21.     Forward 30
  22.     Right 360/7
  23.     Sound "one"
  24.  
  25. Header("pen #2 draws in solid red")
  26. Pen name="pen #2"
  27. Width 3
  28. Color 65535,0,0
  29. Up
  30. Goto 100,100,90
  31. Down
  32. Repeat 8
  33.     Forward 30
  34.     Right 360/8
  35.     Sound "two"
  36.     
  37. Header("pen #3 draws a blue circle")
  38. Pen name="pen #3"
  39. Color 0,0,65535
  40. Up
  41. Goto -100,100,90
  42. Down
  43. Circle 40
  44. Forward 40
  45. Sound "Droplet"
  46.  
  47. Header("pen #4 animates a green triangle")
  48. Pen name="pen #4", picture="triangle", end="yes"
  49. Sound "four",nowait
  50. Forward 100
  51. Sound "", wait // resync
  52.  
  53. Header("pen #2 draws a diagonal")
  54. Pen name="pen #2"
  55. Right 68
  56. Forward 78 
  57. Sound "two"
  58.  
  59. Header("pen #1 draws a horiz line")
  60. Pen name="pen #1"
  61. Left 360/7
  62. Backward 30
  63. Right 360/7
  64. Forward 68
  65. Sound "one"
  66.     
  67. Header("pen #3 completes the circle")
  68. Pen name="pen #3"
  69. Forward 2*π*40-40
  70. Sound "Droplet"
  71.  
  72. Header("pen #4 smears the triangle downwards")
  73. Pen name="pen #4", trail="yes"
  74. Right 90
  75. Sound "four",nowait
  76. Forward 100
  77.  
  78. Header("the Talking Multi Pen")